  <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${SESSION_COMPANY}-WebVideo</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/layerParentFn.js"></script>
<script type="text/javascript">
	var PATH = "${ctx}";
	function addLayerOpen(id,titles,edit){
		if(edit){
			titles = id >0?"编辑："+titles:"新增：";
			layerParentFn.layerOpenModalDialog(titles,"addWebVideo.do?id="+id,1065,530,"inputForm","saveWebVideoJson.do");
		}else{
			titles = "浏览:"+titles;
			layerParentFn.layerOpenBrowseModalDialog(titles,"addWebVideo.do?id="+id,1065,530);
		}
	}
</script>

</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="clear"></div>
			<!-- End .content-box-header -->
			<div class="content-box-content">
				<div class="search-box">
					<shiro:hasPermission name="webVideo:SYS_ADD">
						<a href="javascript:void(0)" onclick="addLayerOpen(0,'',true);" class="btn btn-sm btn-primary" ><i class="fa fa-plus"></i>&nbsp;&nbsp;新增</a>
					</shiro:hasPermission>
					<hr style="margin-top: 10px; margin-bottom: 10px;">
					<shiro:hasPermission name="webVideo:SYS_SEARCH">
						<form action="webVideoList.do" method="post" id="fromsearch" class="form-inline">
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">视频类别</div>
									<select name="type" id="type">
										<option value="" <c:if test="${entity.type=='' }">selected="selected"</c:if>>所有</option>
										<c:forEach var="item" items="${cate_list }" varStatus="s">
											<option value="${item.id}" <c:if test="${item.id == entity.type }"> selected="selected"</c:if>> ${item.title } </option>
										</c:forEach>
									</select>
								</div>
							</div>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">展会名称</div>
									<input type="text" class="form-control" value="${entity.title}" name="title" id="title" placeholder="展会名称" />
								</div>
							</div>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">是否开启</div>
									<select name="status" id="status" class="form-control input-sm">
										<option value="" <c:if test="${entity.status=='' }">selected="selected"</c:if>>所有</option>
										<option value="true" <c:if test="${entity.status==true }">selected="selected"</c:if>>是</option>
										<option value="false" <c:if test="${entity.status==false }">selected="selected"</c:if>>否</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">是否推荐</div>
									<select name="isRecommend" id="isRecommend" class="form-control input-sm">
										<option value="" <c:if test="${entity.isRecommend=='' }">selected="selected"</c:if>>所有</option>
										<option value="true" <c:if test="${entity.isRecommend==true }">selected="selected"</c:if>>是</option>
										<option value="false" <c:if test="${entity.isRecommend==false }">selected="selected"</c:if>>否</option>
									</select>
								</div>
							</div>
							
							<button type="submit"  class="btn btn-sm btn-primary"> <i class="fa fa-search"></i>查询 </button>
						</form>
					</shiro:hasPermission>
				</div>
				<div class="tab-content default-tab" id="tab1">
					<table class="table table-bordered table-hover">
						<thead>
							<tr>
								<th class="w40 text-center">编号</th> 
								<th class="w120 text-center">类别</th> 
								<th class="text-center">标题</th> 
								<th class="w90 text-center">排序</th> 
								<th class="w90 text-center">是否开启</th> 
								<th class="w90 text-center">是否推荐</th>
								<th class="w90 text-center">浏览次数</th>
								<th class="w210 text-center">创建时间</th> 
								<th class="w210 text-center">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="entity" items="${pageBean.list}" varStatus="abc">
							<tr id="tr_${entity.id }">
								<td class="text-center">${startRow+abc.count}</td> 
								<td class="text-center">${entity.typeName}</td> 
								<td>${entity.title}</td> 
								<td class="text-center">${entity.sort}</td> 
								<td class="text-center">${entity.status?"是":"否"}</td> 
								<td class="text-center">${entity.isRecommend?"是":"否"}</td>
								<td class="text-center">${entity.pageView}</td>
								<td class="text-center"><fmt:formatDate value="${entity.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td> 
								<td class="text-center">
									<shiro:hasPermission name="webVideo:SYS_BROWSE">
										<a href="javascript:void(0);" onclick="addLayerOpen(${entity.id},'${entity.title}',false);" title="浏览" class="btn btn-xs btn-info"><i class="fa fa-eye"></i>&nbsp;浏览</a> 
									</shiro:hasPermission>
									<shiro:hasPermission name="webVideo:SYS_EDIT">
										<a href="javascript:void(0);" onclick="addLayerOpen(${entity.id},'',true);" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i>&nbsp;编辑</a>
									</shiro:hasPermission> 
									<shiro:hasPermission name="webVideo:SYS_DELETE">
										<a href="javascript:void(0);" onclick="layerParentFn.listRowRemoveDeleteByID(${entity.id },'deleteWebVideo.do');" class="btn btn-xs btn-danger"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
									</shiro:hasPermission>
								</td>
							</tr>
							</c:forEach>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="11">
									<div class="bulk-actions align-right"></div>
									<div class="paginationstyle">
										<page:pageboot url="webVideoList.do?type=${entity.type}&title=${entity.title}&status=${entity.status}&isRecommend=${entity.isRecommend}&" tagnum="2" pageBean="${pageBean}" />
									</div>
									<div class="clear"></div>
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
				<!-- End #tab2 -->
			</div>
			<!-- End .content-box-content -->
		</div>
		<!-- End #main-content -->
	</div>
</body>
<!-- Download From www.exet.tk-->
</html>
